

<div class="wrapper">
  <div id="header" style="background-image:url(images/bannerCH.jpg)" >
    <div class="fl_left" >
      <h1 width='200px'><a href="" style="text-decoration:none"><strong>C</strong>hi <strong>H</strong>ội</br>
      <?php 
      	if(!isset($_SESSION['tenchihoi']))
		$_SESSION['tenchihoi']=$_GET['tenchihoi'];
		echo ucwords(substr($_SESSION['tenchihoi'],0,15)); 
		?>
	</a></h1>
	  
    </div>
	<div class="login">
		<?php
			if(isset($_COOKIE['tendn']))
			{
				$tendn = $_COOKIE['tendn'];
				$teoq =$_COOKIE['tenpq'];
				$mahv=$_COOKIE['mahv'];
				$_SESSION['tendn']=$tendn;
				$_SESSION['tenpq']=$tenpq;
				$_SESSION['mahv']=$mahv;
			}
			if(isset($_SESSION['tendn'])) 
				echo "<div class='after-login'> Chào <a href='taikhoan.php?content=tttk' >$_SESSION[tendn]</a>
						(<a href='handle/logout.php'>Đăng xuất</a>)
					</div>";
					
			else
			{
				echo "<form method='post' action='handle/checklogin.php'>
						<table class='table-login'>
							<tr><td>Tên đăng nhập</td><td><input name='tendn' id='tendn' type='text' required/></td></tr>
							<tr><td>Mật khẩu</td><td><input name='matkhau' id='matkhau' type='password' required/></td></td></tr>";
				if(isset($_GET['result'])) echo "<tr><td></td><td>$_GET[result]</td></tr>";
				echo			"<tr><td><input id='nhotaikhoan' name='nhotaikhoan' type='checkbox' value='nho'/>Nhớ</td><td><button type='submit'>Đăng nhập</button></td></tr>
						</table>
						</form>";
			}
		?>
	</div>
    <br class="clear" />
	
  </div>
  
</div>
<!-- ####################################################################################################### -->
<div class="wrapper col2">
  <div id="topbar">
    <div id="topnav">
      <ul>
        <li class=""><a href="index.php">Trang chủ</a></li>
		<li><a <?php 
					echo "href='ChiHoi.php?content=khoalbum&mach=$_SESSION[matructhuoc]'";
				
				?>

		>Kho ảnh</a>
    </div>
    <br class="clear" />
  </div>
</div>
